package api

import (
	"context"
	"tencent-video-desktop/backend/internal/services"
)

type FileHandler struct {
	ctx         context.Context
	fileService *services.FileService
}

func NewFileHandler(fileService *services.FileService) *FileHandler {
	return &FileHandler{
		fileService: fileService,
	}
}

func (h *FileHandler) GetSupportedFormats() []string {
	return h.fileService.GetSupportedVideoFormats()
}

func (h *FileHandler) IsVideoFile(filename string) bool {
	return h.fileService.IsVideoFile(filename)
}

func (h *FileHandler) GetVideoInfo(path string) (map[string]interface{}, error) {
	return h.fileService.GetVideoInfo(path)
}

func (h *FileHandler) ScanDirectory(path string) ([]map[string]interface{}, error) {
	return h.fileService.ScanDirectory(path)
}

func (h *FileHandler) SelectFile() (string, error) {
	// This will be implemented with Wails runtime
	return "", nil
}

func (h *FileHandler) SelectDirectory() (string, error) {
	// This will be implemented with Wails runtime
	return "", nil
}
